﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true"
    CodeFile="ManageFee.aspx.cs" Inherits="ManageFee" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="post">
        <%if (Request.Cookies["username"] == null || Request.Cookies["LoaiTK"]==null || Request.Cookies["LoaiTK"].Value != "1")
          { %>
           <asp:Label ID="Label2" runat="server" Text="Acess is denied !"></asp:Label>
           <%} %>
            
        <% if (Request.Cookies["LoaiTK"].Value == "1")
           {%>
            
        <asp:Label ID="Label1" runat="server" Text="<%$Resources:Resource,feestatus %>"></asp:Label>
        <div class="entry">
            <table style="width: 100%">
                <tr>
                    <td colspan="2" style="font-weight: 700; color: #FFFFFF; text-align: center; background-color: #0066FF;
                        font-size: large">
                        <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Resource, feeinfo%>" />
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">
                        &nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <center>
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
                                DataKeyNames="LoaiGD" DataSourceID="SqlDataSource1" GridLines="None" BackColor="White"
                                BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellSpacing="1" Width="100%">
                                <Columns>
                                    <asp:CommandField ShowEditButton="True" />
                                    <asp:BoundField DataField="LoaiGD" HeaderText="LoaiGD" ReadOnly="True" SortExpression="LoaiGD" />
                                    <asp:BoundField DataField="PhiGD" HeaderText="PhiGD" SortExpression="PhiGD" />
                                </Columns>
                                <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                                <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                                <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                                <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                <SortedAscendingHeaderStyle BackColor="#594B9C" />
                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                <SortedDescendingHeaderStyle BackColor="#33276A" />
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                                DeleteCommand="DELETE FROM [PhiGiaoDich] WHERE [LoaiGD] = @original_LoaiGD" InsertCommand="INSERT INTO [PhiGiaoDich] ([LoaiGD], [PhiGD]) VALUES (@LoaiGD, @PhiGD)"
                                OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [PhiGiaoDich]"
                                UpdateCommand="UPDATE [PhiGiaoDich] SET [PhiGD] = @PhiGD WHERE [LoaiGD] = @original_LoaiGD">
                                <DeleteParameters>
                                    <asp:Parameter Name="original_LoaiGD" Type="String" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="LoaiGD" Type="String" />
                                    <asp:Parameter Name="PhiGD" Type="String" />
                                </InsertParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="PhiGD" Type="String" />
                                    <asp:Parameter Name="original_LoaiGD" Type="String" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </center>
                    </td>
                </tr>
            </table>
          <%} %>
        </div>
    </div>
</asp:Content>
